
# 进入构建目录
cd /docker/images/xj-doc

# 构建镜像
docker build -t xj-doc:v-1.0.5 .

# 启动镜像
## 1、将 nginx/resources 拷贝到服务器中的 /workspace/xj-doc 目录
## 2、执行下方命令
docker run  --name xj-doc \
-e TZ=Asia/Shanghai \
-v /etc/localtime:/etc/localtime \
-v /workspace/xj-doc/resources:/data/resources \
-v /workspace/xj-doc/nginx/conf.d:/etc/nginx/conf.d \
-v /workspace/xj-doc/nginx/nginx.conf:/etc/nginx/nginx.conf \
-p 9067:80 \
-p 9066:9066 \
-itd xj-doc:v-1.0.5

## 3、查看容器启动日志
docker logs -f xj-doc

# 推送到阿里云脚本
docker login --username=1720696548@qq.com registry.cn-hangzhou.aliyuncs.com
docker tag 0a32a4ff0537 registry.cn-hangzhou.aliyuncs.com/xijia-public/xj-doc:v-1.0.5
docker push registry.cn-hangzhou.aliyuncs.com/xijia-public/xj-doc:v-1.0.5

# 拉取镜像
